package a.f.l.a;

import a.c.d;
import a.c.e;
import a.c.k;
import a.c.z;
import a.d.w;
import a.f.ad;
import a.f.cd;
import a.f.o;

import java.util.*;

class r
{
  private o a;
  private d b;
  private List[] c;
  private List[] d;
  private gb[] e;
  private HashMap f;
  private HashMap g;
  
  r(d paramd)
  {
    this.a = ((o)paramd.c());
    this.b = paramd;
    this.c = new List[2];
    this.d = new List[2];
    this.e = new gb[2];
    a(true);
    a(false);
    a();
  }
  
  private void a(boolean paramBoolean)
  {
    boolean bool = sb.e;
    int j = sb.d;
    if (!bool) {}
    int i = paramBoolean ? 0 : 1;
    z localz = new z();
    Object localObject1 = paramBoolean ? ad.q : ad.r;
    k localk = this.a.c(localObject1);
    if ((bool) || (localk != null))
    {
      localObject2 = (List)localk.get(this.b);
      if (localObject2 != null) {
        localz.addAll((Collection)localObject2);
      }
    }
    Object localObject2 = paramBoolean ? cd.d(this.a, this.b) : cd.e(this.a, this.b);
    if (localObject2 != null)
    {
      localObject3 = a((cd)localObject2, paramBoolean);
      localz.add(localObject3);
    }
    Object localObject3 = paramBoolean ? this.b.e() : this.b.f();
    gb localgb = gb.a((e)localObject3);
    this.e[i] = localgb;
    Object localObject4;
    if (!bool) {
      if ((localz.isEmpty()) && (localgb == null))
      {
        localObject4 = null;
        if ((!bool) && (j == 0)) {
          break label296;
        }
      }
    }
    if ((bool) || (localz.isEmpty()))
    {
      localObject4 = localgb.a();
      if (bool) {
        return;
      }
      if (j == 0) {}
    }
    else
    {
      if (!bool) {
        if (localgb == null)
        {
          localObject4 = localz;
          if (bool) {
            return;
          }
          if (j == 0) {
            break label296;
          }
        }
      }
      List localList = localgb.b();
      localz.removeAll(localList);
      localObject4 = localz;
    }
    label296:
    this.c[i] = localObject4;
    this.d[i] = a((List)localObject4);
  }
  
  private ad a(cd paramcd, boolean paramBoolean)
  {
    boolean bool = sb.e;
    if (!bool) {}
    int i = paramcd.g() ? 255 : paramcd.b();
    if (!bool) {
      if (paramcd.a())
      {
        w localw = paramBoolean ? this.a.p(this.b) : this.a.q(this.b);
        return ad.a(localw.a(), localw.b(), i);
      }
    }
    return ad.b(i);
  }
  
  public List a(List paramList)
  {
    boolean bool = sb.e;
    int i = sb.d;
    z localz = new z();
    if ((bool) || (paramList != null))
    {
      Iterator localIterator = paramList.iterator();
      do
      {
        do
        {
          ad localad;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localad = (ad)localIterator.next();
          } while (!localad.b());
          if ((bool) || (i != 0)) {
            break label90;
          }
          localz.add(localad);
        } while (bool);
      } while (i == 0);
    }
    label90:
    return localz;
  }
  
  public List a(List paramList, mb parammb1, mb parammb2, boolean paramBoolean)
  {
    boolean bool = sb.e;
    int i = sb.d;
    z localz = new z();
    if ((bool) || (paramList != null))
    {
      Iterator localIterator = paramList.iterator();
      do
      {
        do
        {
          ad localad;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localad = (ad)localIterator.next();
          } while (!a(paramBoolean ? parammb1 : parammb2, paramBoolean ? parammb2 : parammb1, localad));
          if ((bool) || (i != 0)) {
            break label116;
          }
          localz.add(localad);
        } while (bool);
      } while (i == 0);
    }
    label116:
    return localz;
  }
  
  public List a(ob paramob, boolean paramBoolean)
  {
    boolean bool = sb.e;
    int i = paramob.e();
    if (!bool) {}
    h localh1 = paramob.a(paramBoolean ? 0 : i - 2);
    if (!bool) {}
    h localh2 = paramob.a(paramBoolean ? 1 : i - 1);
    return a(localh1.a(), localh2.a(), localh2.c(), paramBoolean);
  }
  
  public List a(mb parammb1, mb parammb2, jb paramjb, boolean paramBoolean)
  {
    boolean bool = sb.e;
    int j = sb.d;
    if (!bool) {}
    int i = paramBoolean ? 0 : 1;
    if (!bool) {
      if (this.c[i] == null) {
        return Collections.EMPTY_LIST;
      }
    }
    List localList = a(this.c[i], parammb1, parammb2, paramBoolean);
    if ((bool) || (localList.size() == 0)) {
      return Collections.EMPTY_LIST;
    }
    z localz = new z();
    eb localeb = paramjb.e();
    Iterator localIterator = localList.iterator();
    do
    {
      ad localad;
      do
      {
        double d1;
        do
        {
          do
          {
            do
            {
              if (!localIterator.hasNext()) {
                break label235;
              }
              localad = (ad)localIterator.next();
              if (!bool)
              {
                if (localad.b()) {
                  break;
                }
                localz.add(localad);
              }
            } while (bool);
          } while (j == 0);
          w localw = a(localad, paramBoolean);
          d1 = paramjb.a() ? localw.b() : localw.a();
        } while (localeb.d() != 0.0D);
        if (bool) {
          break;
        }
      } while (localeb.a() != d1);
      if (bool) {
        break label237;
      }
      localz.add(localad);
    } while (j == 0);
    label235:
    label237:
    return localz;
  }
  
  private void a()
  {
    boolean bool = sb.e;
    int i = sb.d;
    List localList1 = this.d[0];
    List localList2 = this.d[1];
    Iterator localIterator;
    ad localad;
    w localw;
    if (!bool)
    {
      if (localList1 != null)
      {
        this.f = new HashMap(localList1.size());
        localIterator = localList1.iterator();
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localad = (ad)localIterator.next();
          localw = a(localad, this.b.e());
          this.f.put(localad, localw);
          if ((!bool) && (i != 0)) {
            return;
          }
        } while (i == 0);
      }
      if (bool) {}
    }
    else if (!bool)
    {
      if (localList2 != null) {
        this.g = new HashMap(localList2.size());
      }
    }
    else
    {
      localIterator = localList2.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        localad = (ad)localIterator.next();
        localw = a(localad, this.b.f());
        this.g.put(localad, localw);
      } while (i == 0);
    }
  }
  
  public List c(boolean paramBoolean)
  {
    if (!sb.e) {}
    return this.c[1];
  }
  
  public List e(boolean paramBoolean)
  {
    if (!sb.e) {}
    return this.d[1];
  }
  
  public w a(ad paramad, boolean paramBoolean)
  {
    boolean bool = sb.e;
    if (!bool) {
      if ((paramBoolean) && ((bool) || (this.f != null))) {
        return (w)this.f.get(paramad);
      }
    }
    if (!paramBoolean) {
      if ((bool) || (this.g != null)) {
        return (w)this.g.get(paramad);
      }
    }
    return null;
  }
  
  public void c(ob paramob, boolean paramBoolean)
  {
    boolean bool = sb.e;
    int j = sb.d;
    if (!bool) {}
    int i = paramBoolean ? 0 : 1;
    gb localgb = this.e[i];
    if (localgb != null)
    {
      List localList = a(paramob, paramBoolean);
      Iterator localIterator = localList.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        ad localad = (ad)localIterator.next();
        localgb.a(localad);
      } while (j == 0);
    }
  }
  
  private static boolean a(mb parammb1, mb parammb2, ad paramad)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (paramad.a() == 1)
      {
        if (!bool) {}
        return parammb1.j() == parammb2.l();
      }
    }
    if (!bool) {
      if (paramad.a() == 2)
      {
        if (!bool) {}
        return parammb1.l() == parammb2.j();
      }
    }
    if (!bool)
    {
      if (paramad.a() == 4)
      {
        if (!bool) {}
        return parammb1.k() == parammb2.i();
      }
      if (bool) {}
    }
    else if (paramad.a() == 8)
    {
      if (!bool) {}
      return parammb1.i() == parammb2.k();
    }
    return true;
  }
  
  private static w a(ad paramad, e parame)
  {
    o localo = (o)parame.g();
    w localw = localo.o(parame);
    double d1 = localw.a() + paramad.c();
    double d2 = localw.b() + paramad.d();
    return new w(d1, d2);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.r

 * JD-Core Version:    0.7.0.1

 */